import {spaceFormattedMobile as reg} from 'src/data/pattern'

export default function spaceFormatMobile (input) {
  console.log(reg.exec(input))
  return reg.test(input) ? input.toString().replace(reg, function ($0, $1, $2, $3) {
    console.log([$1, $2, $3])
    return [$1, $2, $2].filter(value => value).join(' ')
  }) : input
}
